<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/



//base
Route::get('/',[\App\Http\Controllers\View\BaseController::class,'toHome'])->name('home');
Route::get('about',[\App\Http\Controllers\View\BaseController::class,'toAbout'])->name('about');
Route::get('help',[\App\Http\Controllers\View\BaseController::class,'toHelp'])->name('help');

//auth
Route::get('login',[\App\Http\Controllers\View\AuthController::class,'loginWeb'])->name('login');
Route::post('login',[\App\Http\Controllers\View\AuthController::class,'loginOpt'])->name('login');
Route::delete('logout',[\App\Http\Controllers\View\AuthController::class,'logout'])->name('logout');

//fans
Route::get('user/{user}/getfans',[\App\Http\Controllers\View\UsersController::class,'getFans'])->name('users.getfans');
Route::get('user/{user}/getfanings',[\App\Http\Controllers\View\UsersController::class,'getFanings'])->name('users.getfanings');
Route::post('user/fan/{user}',[\App\Http\Controllers\View\FansController::class,'fanUser'])->name('user.fan');
Route::delete('user/unfan/{user}',[\App\Http\Controllers\View\FansController::class,'unfanUser'])->name('user.unfan');

//users
Route::resource('users',\App\Http\Controllers\View\UsersController::class);


//account active
Route::get('account/active',[\App\Http\Controllers\View\UsersController::class,'AccountActive'])->name('account.active');

//Post
Route::resource('post', \App\Http\Controllers\View\PostController::class);


